<?php
namespace Admin\Model;

use Think\Model\RelationModel;

class UserModel extends RelationModel
{

    protected $_link = array(
        'role' => array(
            'class_name' => 'RoleUser',
            'mapping_type' => self::HAS_ONE,
            'foreign_key' => 'user_id'
        )
    );
}

